<template>
  <div class="done-wrapp">
    <task-header></task-header>
    <task-list
    :tableData="tableData"
    :RowClick="tableRowClick"
    :task_finish="task_finish"
    :task_sign="task_sign"
    :task_delay="task_delay"
    :task_del="task_del">
    </task-list>
    <transition name="fade">
      <task-dialog
      v-if="taskDialogVisible"
      :taskDialogVisible.sync="taskDialogVisible">
    </task-dialog>
    </transition>
  </div>
</template>
<script>
import taskList from '@/components/task-list/task_list'
import taskDialog from '@/components/task-dialog/task_dialog'
import taskHeader from '@/components/task-header/task_header'
export default {
  data(){
    return{
      taskDialogVisible:false,
      value: '',
      tableIndex:'',
      tableData: []
    }
  },
  methods:{
    task_finish(val){
      alert(val)
    },
    task_sign(val){
      alert(val)
    },
    task_delay(val){
      alert(val)
    },
    task_del(val){
      alert(val)
    },
    tableMouseEnter(row, column, cell, event){
        // this.tableIndex = row.taskId;
        console.log(row)
    },
    tableMouseLeave(){
        this.tableIndex = ""
    },
    tableRowClick(row, event, column){
      this.taskDialogVisible = true;
      console.log("获取的数据",row);
    },
    get_ongoingData(){
      let params = {
        "data": {
          taskStatus:20
        },
        "url": "/procdef/queryMyCarryOutOrFinshTask"
      }
      this.$post("/taskInfo/getRaskInfo",params,data => {
         console.log("已完成任务表单数据",data.data);
         this.tableData = data.data;
        },error => {
          console.log("请求出错");
      });
    }
  },
  created(){
     this.get_ongoingData();
  },
  components:{
    taskList,
    taskDialog,
    taskHeader
  }
}
</script>
<style scoped lang="scss">
.fade-enter-active, .fade-leave-active {
transition: opacity .3s;
}
.fade-enter, .fade-leave-to {
opacity: 0;
}
</style>
